package org.budo.phone.api;

import org.budo.phone.api.request.*;
import org.budo.phone.api.response.*;

/**
 * 由各平台实现的，供业务系统调用的，用于发送指令的接口
 * 
 * @author limingwei
 */
public interface BudoPhoneApi {
    /**
     * 迁入
     */
    AgentOnWorkResponse agentOnWork(AgentOnWorkRequest agentOnWorkRequest);

    /**
     * 迁出
     */
    AgentOffWorkResponse agentOffWork(AgentOffWorkRequest agentOffWorkRequest);

    /**
     * 示忙/示闲
     */
    AgentReadyResponse agentReady(AgentReadyRequest agentReadyRequest);

    /**
     * 挂断电话
     * 
     * @see https://doc.yuntongxun.com/p/5a534cde3b8496dd00dce22d
     */
    AgentServiceEndResponse agentServiceEnd(AgentServiceEndRequest agentServiceEndRequest);

    /**
     * 呼叫状态查询
     * 
     * @see https://doc.yuntongxun.com/p/5a5343f03b8496dd00dce164
     */
    QueryCallStateResponse queryCallState(QueryCallStateRequest callStateQueryRequest);

    /**
     * 发起呼叫
     * 
     * @see https://doc.yuntongxun.com/p/5a5342c83b8496dd00dce13b
     */
    IvrDialResponse ivrDial(IvrDialRequest ivrDialRequest);

    /**
     * 查询用户状态
     * 
     * @see https://doc.yuntongxun.com/p/5a534cde3b8496dd00dce22d
     */
    QueryAgentStateResponse queryAgentState(QueryAgentStateRequest queryAgentStateRequest);

    /**
     * 打断录音
     * @param breakFileRequest
     * @return
     */
    BreakFileResponse breakFile(BreakFileRequest breakFileRequest);

    /**
     * 获取子账号列表
     */
    GetSubAccountListResponse getSubAccountList(GetSubAccountListRequest getSubAccountListRequest);
    /*
        获取子账号信息
     */
    GetSubAccountResponse getSubAccount(GetSubAccountsRequest getSubAccountsRequest);

    /**
     * 关闭子账号
     */
    CloseAccountsResponse closeAccounts(CloseAccountsRequest closeAccountsRequest);

    /**
     * 创建子账号
     */
    SubAccountsResponse subAccount(SubAccountsRequest subAccountsRequest);
}